package com.elitetyc.eliteim.client.command.impl;

import com.elitetyc.eliteim.common.constant.Constants;
import com.elitetyc.eliteim.common.proto.RequestProto;
import com.elitetyc.eliteim.common.util.MsgUtil;
import com.elitetyc.eliteim.client.EliteIMClient;
import com.elitetyc.eliteim.client.command.InnerCommand;
import com.elitetyc.eliteim.client.command.anno.Command;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author yuanchao.tan
 * @version 1.0
 * @description 用户列表
 * @Date 2021/9/17 14:31
 */
@Command(command = ":ulist",desc = "获取所有在线用户（同服务器）")
public class UserListInnerCommand implements InnerCommand {

    @Autowired
    private EliteIMClient eliteIMClient;

    @Override
    public void process(String msg) {
        final RequestProto.RequestProtocol data = MsgUtil.buildMsg(Constants.RequestType.ULIST);
        eliteIMClient.sendMsg(data);
    }
}
